﻿@model JRFinances.ViewModels.RealTransactions.PitViewModel

<fieldset>
<legend>PIT @Model.Year</legend>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

        <div class="editor-field">
            @Html.LabelFor(model => model.Year, "Rok")
            @Html.DropDownList("Year", String.Empty)
            @Html.ValidationMessageFor(model => model.Year)
            <input type="submit" value="Wybierz" />
        </div>
}
<p>
<table>
    <tr>
        <th>
            Przychod
        </th>
        <th>
            Rozchod
        </th>
        <th>Bilans</th>
        <th>Podatek</th>
    </tr>

@foreach (var item in Model.PitData) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.TotalIncome)
        </td>
        <td>@Html.DisplayFor(modelItem => item.TotalOutcome)
        </td>
        <td>@Html.DisplayFor(modelItem => item.Balance)</td>
        <td>@Html.DisplayFor(modelItem => item.Tax)</td>
    </tr>
}

</table>
</p>
</fieldset>
